using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace TankWars.Items
{
    public class HealthItem : Item
    {
        public HealthItem(Texture2D itemTexture, Vector2 position)
        {
            base.Sprite = itemTexture;
            base.vPosition = position;

            base.boundingCircle = new BoundingSphere(new Vector3(vPosition, 0), itemTexture.Width / 2);
        }

        /// <summary>
        /// Adds 10 health to the input tank
        /// </summary>
        /// <param name="tank"></param>
        public override void ExecuteAction(Tank tank)
        {
            tank.Health += 10;
            if (tank.Health > 100)
            {
                tank.Health = 100;
            }
        }
    }
}
